I'm guessing you're on the final stage of the hero story using Sonic. There should be two rail shortcuts, one near the early part of the stage, and one in the second half. (Also watch out for a real nasty hair pin turn 3/4 through the track.) Be sure to level up as fast as possible. Also try to use tornadoes at choke points such as just before sequences where you can't control your character.